package com.wicket.okrapp.base.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.wicket.okrapp.base.service.MOmsAssistNodeStatusService;
import com.wicket.okrapp.base.service.dto.req.*;
import com.wicket.okrapp.common.exception.BizException;
import com.wicket.okrapp.common.util.CommonFunctionHelper;
import com.wicket.okrapp.dal.mapper.mbg.OmsAssistNodeStatusMapper;
import com.wicket.okrapp.dal.po.mbg.OmsAssistNodeStatus;
import org.apache.skywalking.apm.toolkit.trace.Tag;
import org.apache.skywalking.apm.toolkit.trace.Tags;
import org.apache.skywalking.apm.toolkit.trace.Trace;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import java.util.ArrayList;

import com.wicket.okrapp.common.dto.FieldInfo;

import java.util.stream.Collectors;

/**
 * @author ：
 * @since 2022/1/19 15:39
 *
 *
 * @version 1.0
 */
@Service
public class MOmsAssistNodeStatusServiceImpl
        extends ServiceImpl<OmsAssistNodeStatusMapper, OmsAssistNodeStatus>
        implements MOmsAssistNodeStatusService {

    @Autowired
    OmsAssistNodeStatusMapper omsAssistNodeStatusMapper;

    /**
   * 3-11-01新增内容节点状态[314]
   * gen by moon at 10/15/2022, 9:58:25 PM
   */
 @Trace(operationName = "3-11-01新增内容节点状态")
 @Tags({@Tag(key = "参数",value = "arg[0]"),
 @Tag(key = "返回值",value = "returnedObj")})
  @Override
  @Transactional(rollbackFor=Exception.class)
  public  String  addAssistNodeStatus(OmsAssistNodeStatus omsAssistNodeStatus) {
     omsAssistNodeStatus.setAssistNodeStatusId(CommonFunctionHelper.getUid());//DISTRIBUTED_ID
omsAssistNodeStatus.setOperationInductionId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecInductionRecordId());//CURRENT_INDUCTIONID
omsAssistNodeStatus.setCreateInductionId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecInductionRecordId());//CURRENT_INDUCTIONID
omsAssistNodeStatus.setCreateTime(CommonFunctionHelper.getCurrentTime());//SYSTEM_CURRENT_TIME
omsAssistNodeStatus.setOperateTime(CommonFunctionHelper.getCurrentTime());//SYSTEM_CURRENT_TIME
omsAssistNodeStatus.setIsValid("FALSE");
omsAssistNodeStatus.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID
omsAssistNodeStatus.setAppId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecAppId());//CURRENT_APPID
     if(super.save(omsAssistNodeStatus)){
        return omsAssistNodeStatus.getAssistNodeStatusId();
     }else {
        return "-1";
     }
    
  }

    /**
   * 3-11-01查内容节点状态详情[317]
   * gen by moon at 3/30/2023, 12:38:33 PM
   */
 @Trace(operationName = "3-11-01查内容节点状态详情")
 @Tags({@Tag(key = "参数",value = "arg[0]"),
 @Tag(key = "返回值",value = "returnedObj")})
  @Override
  @Transactional(rollbackFor=Exception.class)
  public  OmsAssistNodeStatus  queryAssistNodeStatusDetail(QueryAssistNodeStatusDetailReq reqDto) {
     
        try {
         reqDto.setIsValid("FALSE");
reqDto.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID
            QueryWrapper<OmsAssistNodeStatus> queryWrapper = new QueryWrapper<>();
            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap, new ArrayList<>());
            queryWrapper.orderByDesc("create_time");
            List<OmsAssistNodeStatus> retList = super.list(queryWrapper);
            if(retList!=null && retList.size()>0){
                OmsAssistNodeStatus retData = retList.get(0);

                return retData;
            }
            return null;
      } catch (Exception e) {
          e.printStackTrace();
          throw new BizException("-1",e,false);
      }
  }

    /**
   * 3-11-01修改内容节点状态[315]
   * gen by moon at 10/15/2022, 9:58:26 PM
   */
 @Trace(operationName = "3-11-01修改内容节点状态")
 @Tags({@Tag(key = "参数",value = "arg[0]"),
 @Tag(key = "返回值",value = "returnedObj")})
  @Override
  @Transactional(rollbackFor=Exception.class)
  public  boolean  updateAssistNodeStatus(OmsAssistNodeStatus omsAssistNodeStatus) {
     
        return super.updateById(omsAssistNodeStatus);
  }
/**
   * 3-11-01删除内容节点状态[316]
   * gen by moon at 10/15/2022, 9:58:27 PM
   */
 @Trace(operationName = "3-11-01删除内容节点状态")
 @Tags({@Tag(key = "参数",value = "arg[0]"),
 @Tag(key = "返回值",value = "returnedObj")})
  @Override
  @Transactional(rollbackFor=Exception.class)
  public  boolean  deleteAssistNodeStatus(String assistNodeStatusId ) {
     
      return super.removeById(assistNodeStatusId);
  }
/**
   * 3-11-01查内容节点状态列表[318]
   * gen by moon at 10/15/2022, 9:58:28 PM
   */
 @Trace(operationName = "3-11-01查内容节点状态列表")
 @Tags({@Tag(key = "参数",value = "arg[0]"),
 @Tag(key = "返回值",value = "returnedObj")})
  @Override
  @Transactional(rollbackFor=Exception.class)
  public  List<OmsAssistNodeStatus>  queryAssistNodeStatusList(QueryAssistNodeStatusListReq reqDto) {
     
        try {
            QueryWrapper<OmsAssistNodeStatus> queryWrapper = new QueryWrapper<>();
            reqDto.setIsValid("FALSE");
reqDto.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID
            
            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsAssistNodeStatus.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsAssistNodeStatus.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper,likeList,fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap,likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsAssistNodeStatus.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);
            
            return ((List<OmsAssistNodeStatus>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1",e,false);
        }
  }
/**
   * 3-11-01批量删内容节点状态[2772]
   * gen by moon at 10/15/2022, 9:58:29 PM
   */
 @Trace(operationName = "3-11-01批量删内容节点状态")
 @Tags({@Tag(key = "参数",value = "arg[0]"),
 @Tag(key = "返回值",value = "returnedObj")})
  @Override
  @Transactional(rollbackFor=Exception.class)
  public  boolean  batchDeleteAssistNodeStatus(List<String> reqDto) {
     
          if(reqDto==null || reqDto.size()==0){
            return false;
          }
          
          return super.removeByIds(reqDto);
  }
/**
   * 3-11-01批量查内容节点状态[2773]
   * gen by moon at 10/15/2022, 9:58:30 PM
   */
 @Trace(operationName = "3-11-01批量查内容节点状态")
 @Tags({@Tag(key = "参数",value = "arg[0]"),
 @Tag(key = "返回值",value = "returnedObj")})
  @Override
  @Transactional(rollbackFor=Exception.class)
  public  List<OmsAssistNodeStatus>  batchQueryAssistNodeStatus(BatchQueryAssistNodeStatusReq reqDto) {
     
        try {
            QueryWrapper<OmsAssistNodeStatus> queryWrapper = new QueryWrapper<>();
            reqDto.setIsValid("FALSE");
            if(reqDto.getAssistNodeStatusList()==null || reqDto.getAssistNodeStatusList().isEmpty()){
                    return new ArrayList<>();
                }
        queryWrapper.in("assist_node_type_object_id", reqDto.getAssistNodeStatusList());
            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsAssistNodeStatus.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsAssistNodeStatus.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper,likeList,fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap,likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsAssistNodeStatus.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);
            
            return ((List<OmsAssistNodeStatus>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1",e,false);
        }
  }
/**
   * 3-11-01批量改内容节点状态[2774]
   * gen by moon at 10/15/2022, 9:58:31 PM
   */
 @Trace(operationName = "3-11-01批量改内容节点状态")
 @Tags({@Tag(key = "参数",value = "arg[0]"),
 @Tag(key = "返回值",value = "returnedObj")})
  @Override
  @Transactional(rollbackFor=Exception.class)
  public  boolean  batchUpdateAssistNodeStatus(List<OmsAssistNodeStatus> omsAssistNodeStatus) {
     
      if(omsAssistNodeStatus==null || omsAssistNodeStatus.size()==0){
        return false;
      }
        return super.saveOrUpdateBatch(omsAssistNodeStatus);
      
  }
/**
   * 3-11-01批量增内容节点状态[2962]
   * gen by moon at 10/15/2022, 9:58:31 PM
   */
 @Trace(operationName = "3-11-01批量增内容节点状态")
 @Tags({@Tag(key = "参数",value = "arg[0]"),
 @Tag(key = "返回值",value = "returnedObj")})
  @Override
  @Transactional(rollbackFor=Exception.class)
  public  boolean  batchAddAssistNodeStatus(List<OmsAssistNodeStatus> omsAssistNodeStatus) {
     
      if(omsAssistNodeStatus==null || omsAssistNodeStatus.size()==0){
        return false;
      }
      
      return super.saveBatch(omsAssistNodeStatus.stream().map(item->{
       
          return item;
      }).collect(Collectors.toList()));
  }
/**
   * 3-11-01查询目标内容父子状态列表[3459]
   * gen by moon at 9/13/2022, 12:32:26 AM
   */
 @Trace(operationName = "3-11-01查询目标内容父子状态列表")
 @Tags({@Tag(key = "参数",value = "arg[0]"),
 @Tag(key = "返回值",value = "returnedObj")})
  @Override
  @Transactional(rollbackFor=Exception.class)
  public  List<OmsAssistNodeStatus>  queryPresentAssistNodeStatusList(QueryPresentAssistNodeStatusListReq reqDto) {
     
        try {
            QueryWrapper<OmsAssistNodeStatus> queryWrapper = new QueryWrapper<>();
            reqDto.setIsValid("FALSE");
            
            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsAssistNodeStatus.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsAssistNodeStatus.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper,likeList,fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap,likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsAssistNodeStatus.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);
            queryWrapper.orderByDesc("assist_node_type_object_code");
queryWrapper.orderByDesc("operate_time");
            return ((List<OmsAssistNodeStatus>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1",e,false);
        }
  }
/**
   * M3-11-01一键删除父子状态测试验证数据[4427]
   * gen by moon at 10/15/2022, 9:58:32 PM
   */
 @Trace(operationName = "M3-11-01一键删除父子状态测试验证数据")
 @Tags({@Tag(key = "参数",value = "arg[0]"),
 @Tag(key = "返回值",value = "returnedObj")})
  @Override
  @Transactional(rollbackFor=Exception.class)
  public  boolean  autoDeleteAssistNnodeStatusTest(List<String> reqDto) {
     
          if(reqDto==null || reqDto.size()==0){
            return false;
          }
          
          return super.removeByIds(reqDto);
  }
/**
   * M3-11-01查询父子状态测试列表[4455]
   * gen by moon at 10/15/2022, 9:58:33 PM
   */
 @Trace(operationName = "M3-11-01查询父子状态测试列表")
 @Tags({@Tag(key = "参数",value = "arg[0]"),
 @Tag(key = "返回值",value = "returnedObj")})
  @Override
  @Transactional(rollbackFor=Exception.class)
  public  List<OmsAssistNodeStatus>  queryAssistNnodeStatusTestList(QueryAssistNnodeStatusTestListReq reqDto) {
     
        try {
            QueryWrapper<OmsAssistNodeStatus> queryWrapper = new QueryWrapper<>();
            
            
            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsAssistNodeStatus.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsAssistNodeStatus.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper,likeList,fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap,likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsAssistNodeStatus.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);
            
            return ((List<OmsAssistNodeStatus>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1",e,false);
        }
  }
/**
   * M3-构造父子状态测试验证数据[4488]
   * gen by moon at 10/15/2022, 9:58:33 PM
   */
 @Trace(operationName = "M3-构造父子状态测试验证数据")
 @Tags({@Tag(key = "参数",value = "arg[0]"),
 @Tag(key = "返回值",value = "returnedObj")})
  @Override
  @Transactional(rollbackFor=Exception.class)
  public  String  buildAssistNnodeStatusTest(OmsAssistNodeStatus omsAssistNodeStatus) {
     omsAssistNodeStatus.setAssistNodeStatusId(CommonFunctionHelper.getUid());//DISTRIBUTED_ID
omsAssistNodeStatus.setOperationInductionId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecInductionRecordId());//CURRENT_INDUCTIONID
omsAssistNodeStatus.setCreateInductionId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecInductionRecordId());//CURRENT_INDUCTIONID
omsAssistNodeStatus.setOperateTime(CommonFunctionHelper.getCurrentTime());//SYSTEM_CURRENT_TIME
omsAssistNodeStatus.setCreateTime(CommonFunctionHelper.getCurrentTime());//SYSTEM_CURRENT_TIME
omsAssistNodeStatus.setIsValid("FALSE");
omsAssistNodeStatus.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID
omsAssistNodeStatus.setAppId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecAppId());//CURRENT_APPID
     if(super.save(omsAssistNodeStatus)){
        return omsAssistNodeStatus.getAssistNodeStatusId();
     }else {
        return "-1";
     }
    
  }
/**
   * M3-修改父子状态测试[4489]
   * gen by moon at 10/15/2022, 9:58:34 PM
   */
 @Trace(operationName = "M3-修改父子状态测试")
 @Tags({@Tag(key = "参数",value = "arg[0]"),
 @Tag(key = "返回值",value = "returnedObj")})
  @Override
  @Transactional(rollbackFor=Exception.class)
  public  boolean  updateAssistNnodeStatusTest(OmsAssistNodeStatus omsAssistNodeStatus) {
     omsAssistNodeStatus.setOperationInductionId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecInductionRecordId());//CURRENT_INDUCTIONID
omsAssistNodeStatus.setOperateTime(CommonFunctionHelper.getCurrentTime());//SYSTEM_CURRENT_TIME
        return super.updateById(omsAssistNodeStatus);
  }
/**
   * 3-11-01查询目标内容父子状态列表ByCodes[4683]
   * gen by moon at 10/15/2022, 9:58:35 PM
   */
 @Trace(operationName = "3-11-01查询目标内容父子状态列表ByCodes")
 @Tags({@Tag(key = "参数",value = "arg[0]"),
 @Tag(key = "返回值",value = "returnedObj")})
  @Override
  @Transactional(rollbackFor=Exception.class)
  public  List<OmsAssistNodeStatus>  batchQueryPresentAssistNodeStatusListByCodes(BatchQueryPresentAssistNodeStatusListByCodesReq reqDto) {
     
        try {
            QueryWrapper<OmsAssistNodeStatus> queryWrapper = new QueryWrapper<>();
            reqDto.setIsValid("FALSE");
            if(reqDto.getPresentAssistNodeStatusList()==null || reqDto.getPresentAssistNodeStatusList().isEmpty()){
                    return new ArrayList<>();
                }
        queryWrapper.in("assist_node_type_object_code", reqDto.getPresentAssistNodeStatusList());
            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsAssistNodeStatus.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsAssistNodeStatus.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper,likeList,fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap,likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsAssistNodeStatus.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);
            queryWrapper.orderByDesc("assist_node_type_object_code");
queryWrapper.orderByDesc("operate_time");
            return ((List<OmsAssistNodeStatus>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1",e,false);
        }
  }
/**
   * M3-11-01批量改父子状态测试[5557]
   * gen by moon at 12/30/2022, 6:30:25 PM
   */
 @Trace(operationName = "M3-11-01批量改父子状态测试")
 @Tags({@Tag(key = "参数",value = "arg[0]"),
 @Tag(key = "返回值",value = "returnedObj")})
  @Override
  @Transactional(rollbackFor=Exception.class)
  public  boolean  batchUpdateAssistNnodeStatusTest(List<OmsAssistNodeStatus> omsAssistNodeStatus) {

      if(omsAssistNodeStatus==null || omsAssistNodeStatus.size()==0){
        return false;
      }
        return super.saveOrUpdateBatch(omsAssistNodeStatus);

  }
/**
   * M3-11-01批量查询父子状态测试[5558]
   * gen by moon at 12/30/2022, 6:30:25 PM
   */
 @Trace(operationName = "M3-11-01批量查询父子状态测试")
 @Tags({@Tag(key = "参数",value = "arg[0]"),
 @Tag(key = "返回值",value = "returnedObj")})
  @Override
  @Transactional(rollbackFor=Exception.class)
  public  List<OmsAssistNodeStatus>  batchQueryAssistNnodeStatusTest(BatchQueryAssistNnodeStatusTestReq reqDto) {

        try {
            QueryWrapper<OmsAssistNodeStatus> queryWrapper = new QueryWrapper<>();

            if(reqDto.getAssistNodeStatusList()==null || reqDto.getAssistNodeStatusList().isEmpty()){
                    return new ArrayList<>();
                }
        queryWrapper.in("assist_node_type_object_id", reqDto.getAssistNodeStatusList());
            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsAssistNodeStatus.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsAssistNodeStatus.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper,likeList,fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap,likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsAssistNodeStatus.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);

            return ((List<OmsAssistNodeStatus>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1",e,false);
        }
  }
/**
   * M3查询父子状态测试详情[5946]
   * gen by moon at 3/30/2023, 12:38:34 PM
   */
 @Trace(operationName = "M3查询父子状态测试详情")
 @Tags({@Tag(key = "参数",value = "arg[0]"),
 @Tag(key = "返回值",value = "returnedObj")})
  @Override
  @Transactional(rollbackFor=Exception.class)
  public  OmsAssistNodeStatus  queryAssistNnodeStatusTestDetail(QueryAssistNnodeStatusTestDetailReq reqDto) {
     
        try {
         
            QueryWrapper<OmsAssistNodeStatus> queryWrapper = new QueryWrapper<>();
            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap, new ArrayList<>());
            queryWrapper.orderByDesc("create_time");
            List<OmsAssistNodeStatus> retList = super.list(queryWrapper);
            if(retList!=null && retList.size()>0){
                OmsAssistNodeStatus retData = retList.get(0);
                
                return retData;
            }
            return null;
      } catch (Exception e) {
          e.printStackTrace();
          throw new BizException("-1",e,false);
      }
  }
/**
   * 3-11-01执行内容节点状态标识排序[6571]
   * gen by moon at 5/11/2023, 4:26:07 AM
   */
 @Trace(operationName = "3-11-01执行内容节点状态标识排序")
 @Tags({@Tag(key = "参数",value = "arg[0]"),
 @Tag(key = "返回值",value = "returnedObj")})
  @Override
  @Transactional(rollbackFor=Exception.class)
  public  List<OmsAssistNodeStatus>  implementAssistNodeStatusByCodeOrder(ImplementAssistNodeStatusByCodeOrderReq reqDto) {

        try {
            QueryWrapper<OmsAssistNodeStatus> queryWrapper = new QueryWrapper<>();
            reqDto.setIsValid("FALSE");

            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsAssistNodeStatus.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsAssistNodeStatus.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper,likeList,fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap,likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsAssistNodeStatus.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);
            queryWrapper.orderByDesc("assist_node_type_object_code");
queryWrapper.orderByDesc("operate_time");
            return ((List<OmsAssistNodeStatus>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1",e,false);
        }
  }
}
